---
id: 65823040bdb32949d4c1a96f
title: ステップ 10
challengeType: 20
dashedName: step-10
---

# --description--

You will need a function to calculate the total amount of expenses. Define a function named `total_expenses` that takes one parameter `expenses`. Fill the function body with a `pass` statement for now.

# --hints--

You should define a function named `total_expenses`.

```js
({ test: () => assert(__pyodide.runPython(`
    import inspect    
    inspect.isfunction(total_expenses)
  `))
})
```

Your`total_expenses` function should take a single `expenses` parameter.

```js
({ test: () => assert(__pyodide.runPython(`
    import inspect    
    sig = str(inspect.signature(total_expenses))
    sig == '(expenses)'
  `))
})
```

# --seed--

## --seed-contents--

```py
def add_expense(expenses, amount, category):
    expenses.append({'amount': amount, 'category': category})

def print_expenses(expenses):
    for expense in expenses:
        print(f'Amount: {expense["amount"]}, Category: {expense["category"]}')
--fcc-editable-region--

--fcc-editable-region--

expenses = []
```
